<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>武打</title>
</head>
    <style>
        div:nth-of-type(1){
            width: 187px;
            height: 127px;
            background: url(img/run.png);
            animation: a .5s steps(5,end) infinite;
        }
        @keyframes a{
            100%{
                background-position: -938px;
            }
        }
        div:nth-of-type(2){
            width: 80px;
            height: 80px;
            background: url(img/mm.jpg);
            animation: b .5s steps(8,end) infinite;
        }
        @keyframes b{
            100%{
                background-position: -640px;
            }
        }
    </style>
<body>
    <div></div>
    <div></div>
</body>
</html>